package tools

import (
	"fmt"
	"net/http"
	_ "net/http/pprof"
)

func Startpprof(port string) {
	go func() {
		err := http.ListenAndServe(":"+port, nil)
		if err != nil {
			fmt.Println("Start pprof failed:", err.Error())
		}
	}()
}
